package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.TestService;
import com.itheima.pojo.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author nglsk
 * @version v1.0
 * @date 2019/11/18 15:25
 * @description TODO
 **/
@RestController
@RequestMapping("/test")
public class TestController {

    /**
     *  dubbo看到这个注解，会给service创建代理对象
     */
    @Reference
    TestService testService;

    @RequestMapping("/findAllUser")
    public List<User> findAllUser() {
        return testService.findAllUser();
    }


}
